DomainObjects Class Library

Query.FindObjectByPrimaryKey Method (Object[])

Retrieves a persistable object by its primary key.

public static ClassToFind <ClassToFind>FindObjectByPrimaryKey(
   params Object[] primaryKey
); where ClassToFind: PersistableObject

Parameters

primaryKey
The object's primary key.

Return Value

If found, the instance of the given type with the given primary key, otherwise null.

Example

See a usage example at QueryTests.FindObjectByPrimaryKey().

See Also

Query Class | DomainObjects.Facade.Command Namespace | Query.FindObjectByPrimaryKey Overload List